package com.fenghongzhang.day012;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class MyReceiver5 extends BroadcastReceiver {

    private static final String TAG = "MyReceiver5";

    @Override
    public void onReceive(Context context, Intent intent) {

        String action = intent.getAction();
        if(action.equals(Intent.ACTION_USER_PRESENT)){
            Log.i(TAG, "onReceive: 屏幕亮了");
        }else if(action.equals(Const.ABC)){

        }else if(action.equals(Intent.ACTION_SCREEN_ON)) {//过期
            Log.i(TAG, "onReceive: 屏幕开");
        }else if (action.equals(Intent.ACTION_AIRPLANE_MODE_CHANGED)){
            Log.i(TAG, "onReceive: 改变了");
        }
    }
}
